<template>
  <div>
    <h1>我是app.vue</h1>
    <button @click="show = false">销毁</button>
    <!-- true创建，false销毁 -->
    <MyTest v-if="show"/>
  </div>
</template>

<script>
import MyTest from './components/MyTest.vue'
export default {
  components: {
    MyTest
  },
  data() {
    return {
      show: true
    }
  },
}
</script>

<style></style>
